package com.itqf.ipmsys.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.itqf.ipmsys.dto.PoliceFindDto;
import com.itqf.ipmsys.entity.Police;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * <p>
 * 警员表 Mapper 接口
 * </p>
 *
 * @author corn
 * @since 2021-09-22
 */
public interface PoliceMapper extends BaseMapper<Police> {

    /**
     * 添加用户, 回显
     * @param police
     * @return
     */
    void addPolice(Police police);

    /**
     * 更新警员信息
     * @param police
     */
    int updatePolice(Police police);

    /**
     * 全查找或根据条件查找
     * @param page
     * @param policeFindDto
     * @return
     */
    IPage<Map<String, Object>> selectPoliceByPage(@Param("page")IPage<Map<String, Object>> page,
                                                  @Param("policeFindDto") PoliceFindDto policeFindDto);
}
